package com.bage.common.exception;

import com.bage.common.constant.ApiResponseCode;
import com.bage.common.dto.ApiResponse;
import org.aspectj.apache.bcel.classfile.Code;

public class BaseException extends  RuntimeException{
    private Integer code=null;
    private  static final long serialVersionUID = 2612992235262400823L;
    public Integer getCode(){
        return code;
    }
    public void setCode(Integer code)
    {
        this.code=code;
    }
    public BaseException(String message){
        super(message);
        this.code= ApiResponseCode.SERVICE_ERROR.getCode();
    }
    public BaseException(String message,Throwable cause){
        super(message,cause);
        this.code= ApiResponseCode.SERVICE_ERROR.getCode();
    }
    public BaseException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public BaseException(Integer code, String message, Throwable t) {
        super(message, t);
        this.code = code;
    }
}
